<!--
*Author：jxx
 *Contact：283591387@qq.com
 *代码由框架生成,任何更改都可能导致被代码生成器覆盖
 *业务请在@/extension/dhj/holiday/Holiday.js此处编写
 -->
<template>
    <view-grid ref="grid"
               :columns="columns"
               :detail="detail"
               :editFormFields="editFormFields"
               :editFormOptions="editFormOptions"
               :searchFormFields="searchFormFields"
               :searchFormOptions="searchFormOptions"
               :table="table"
               :extend="extend">
    </view-grid>
</template>
<script>
    import extend from "@/extension/dhj/holiday/Holiday.js";
    import { ref, defineComponent } from "vue";
    export default defineComponent({
        setup() {
            const table = ref({
                key: 'HolidayId',
                footer: "Foots",
                cnName: '假期',
                name: 'holiday/Holiday',
                url: "/Holiday/",
                sortName: "HolidayId"
            });
            const editFormFields = ref({"HolidayName":"","StartTime":"","EndTime":"","Duration":""});
            const editFormOptions = ref([[{"title":"节假日名称","field":"HolidayName","type":"text"},
                               {"title":"开始时间","field":"StartTime","type":"date"},
                               {"title":"结束时间","field":"EndTime","type":"date"},
                               {"title":"持续时间","field":"Duration","type":"text"}]]);
            const searchFormFields = ref({"HolidayName":"","HolidayTime":"","Duration":""});
            const searchFormOptions = ref([[{"title":"节假日名称","field":"HolidayName","type":"like"},{"title":"节假日时间","field":"HolidayTime","type":"date"},{"title":"持续时间","field":"Duration","type":"text"}]]);
            const columns = ref([{field:'HolidayId',title:'HolidayId',type:'int',width:110,hidden:true,readonly:true,require:true,align:'left'},
                       {field:'HolidayName',title:'节假日名称',type:'string',width:110,align:'left',sort:true},
                       {field:'HolidayTime',title:'节假日时间',type:'date',width:150,align:'left',sort:true},
                       {field:'StartTime',title:'开始时间',type:'string',width:150,hidden:true,align:'left'},
                       {field:'EndTime',title:'结束时间',type:'string',width:150,hidden:true,align:'left'},
                       {field:'Duration',title:'持续时间',type:'string',width:110,align:'left'}]);
            const detail = ref({
                cnName: "#detailCnName",
                table: "#detailTable",
                columns: [],
                sortName: "",
                key: ""
            });
            return {
                table,
                extend,
                editFormFields,
                editFormOptions,
                searchFormFields,
                searchFormOptions,
                columns,
                detail,
            };
        },
    });
</script>
